package key2.exer3;

/**
 * @author shkstart
 * @date 2022/5/29 - 21:03
 */
public class SalariedEmployee extends Employee {
    private double monthlySalary;

    public SalariedEmployee(String name, int number, MyDate birthday) {
        super(name, number, birthday);
    }


    public SalariedEmployee(String name, int number, MyDate birthday,double monthlySalary) {
        super(name, number, birthday);
        this.monthlySalary = monthlySalary;
    }

    public double earnings() {
        return monthlySalary;
    }
    public String toString() {
        return "SalariedEmployee[" + super.toString() + "]";
    }
}
